package pl.edu.agh.ki.ewywiadowka.client.dto;

import java.util.Date;

import com.google.gwt.user.client.rpc.IsSerializable;

public class MarkDTO implements IsSerializable {
	
	public Integer id;
	public Integer value;
	public Date date;
	public Integer weight;
	public StudentDTO student;
	public SubjectDTO subject;

	public MarkDTO() {}

	public MarkDTO(Integer id, Integer value, Date date, Integer weight,
			StudentDTO student, SubjectDTO subject) {
		super();
		this.id = id;
		this.value = value;
		this.date = date;
		this.weight = weight;
		this.student = student;
		this.subject = subject;
	}
	
	public String toString() {
		return value.toString();
	}
	
	public boolean equals(MarkDTO mdto) {
		return value==mdto.value && date.equals(mdto.date) && weight==mdto.weight && student.equals(mdto.student) && subject.equals(mdto.subject);
	}
	
}
